package com.xxx.meter.ui.info;

import android.content.Intent;
import android.view.View;
import android.widget.TextView;

import com.xxx.meter.R;
import com.xxx.meter.base.BaseActivity;
import com.xxx.meter.model.utils.ButtonUtil;
import com.xxx.meter.ui.info.web.InfoFindWebActivity;

import butterknife.BindView;
import butterknife.OnClick;

public class InfoWorkActivity extends BaseActivity {

    @BindView(R.id.main_title)
    TextView mTitle;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_work_info;
    }

    @Override
    protected void initData() {
        mTitle.setText("工作资料");
    }

    @OnClick({R.id.main_return, R.id.work_info_1, R.id.work_info_2, R.id.work_info_3, R.id.work_info_4})
    public void OnClick(View view) {
        if (ButtonUtil.isFastClick()) return;
        switch (view.getId()) {
            case R.id.main_return:
                finish();
                break;
            case R.id.work_info_1:
                Intent intent = new Intent(this, InfoFindWebActivity.class);
                intent.putExtra("type", 3);
                intent.putExtra("subType", 1);
                intent.putExtra("title", "信号源流程图");
                startActivity(intent);
                break;
            case R.id.work_info_2:
                Intent intent1 = new Intent(this, InfoFindWebActivity.class);
                intent1.putExtra("type", 3);
                intent1.putExtra("subType", 2);
                intent1.putExtra("title", "配电流程图");
                startActivity(intent1);
                break;
            case R.id.work_info_3:
                Intent intent2 = new Intent(this, InfoFindWebActivity.class);
                intent2.putExtra("type", 3);
                intent2.putExtra("subType", 3);
                intent2.putExtra("title", "设备操作手册");
                startActivity(intent2);
                break;
            case R.id.work_info_4:
                Intent intent3 = new Intent(this, InfoFindWebActivity.class);
                intent3.putExtra("type", 3);
                intent3.putExtra("subType", 4);
                intent3.putExtra("title", "应急预案");
                startActivity(intent3);
                break;
        }
    }
}
